﻿<UserControl x:Class="Vtron.HipcConfigurationTools.AddCodecView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:Infrastructure="clr-namespace:Vtron.HipcConfigurationTools">
    <UserControl.Resources>
        <Infrastructure:RadioBoolToEnumConverter x:Key="RadioBoolToEnumConverter" />
    </UserControl.Resources>
    <Grid>
        <StackPanel Orientation="Horizontal">
            <!--<Button Content="新增" Margin="5,0,15,0" Command="{Binding AddCommand}" Template="{StaticResource OnlySubmitButtonTemplate}" HorizontalAlignment="Center" Cursor="Hand" Height="25"/>-->
            <RadioButton GroupName="CodecType" Margin="5,0,0,0" VerticalAlignment="Center" IsChecked="{Binding Path=CodecType, Converter={StaticResource RadioBoolToEnumConverter}, ConverterParameter=Encoded}">编码器</RadioButton>
            <RadioButton GroupName="CodecType" Margin="5,0,0,0" VerticalAlignment="Center" IsChecked="{Binding Path=CodecType, Converter={StaticResource RadioBoolToEnumConverter}, ConverterParameter=Decode}">解码器</RadioButton>
            <RadioButton GroupName="EncodedType" Margin="5,0,0,0" VerticalAlignment="Center" IsChecked="{Binding Path=EncodedType, Converter={StaticResource RadioBoolToEnumConverter}, ConverterParameter=CVBS}" >CVBS</RadioButton>
            <RadioButton GroupName="EncodedType" Margin="5,0,0,0" VerticalAlignment="Center" IsChecked="{Binding Path=EncodedType, Converter={StaticResource RadioBoolToEnumConverter}, ConverterParameter=RGB}">RGB</RadioButton>
            <TextBox Name="AddCodecTextBox" MinWidth="100" Style="{StaticResource CustomTextBoxStyle}" 
                     Infrastructure:ReturnKey.Command="{Binding Path=AddCodecCommand}" 
                     Infrastructure:ReturnKey.DefaultTextAfterCommandExecution="新增编解码器" 
                     Text="新增编解码器" 
                     Margin="5,0,0,0"/>
        </StackPanel>
    </Grid>
</UserControl>